Skip to content

Update pubchempy.py #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

riinbre-bioinfo
Copy link

Canonical SMILES and Isometric SMILES are listed as deprecated in favor of SMILES on the PUG REST documentation Link Added capability to get SMILES string as follows:

def run(Compound_Name):
compounds = pcp.get_compounds(Compound_Name, 'name')
for c in compounds:
print(c.to_dict(properties=['smiles'])['smiles'])

Canonical SMILES and Isometric SMILES are listed as deprecated in favor of SMILES (both stereoscopic and isometric) on the PUG REST documentation.  Added capability to get SMILES string as follows:

def run(Compound_Name):
  compounds = pcp.get_compounds(Compound_Name, 'name')
  for c in compounds:
    print(c.to_dict(properties=['smiles'])['smiles'])
@mcs07
Copy link
Owner

mcs07 commented Jul 28, 2025

Thanks for this contribution. I have decided to merge PR #102 instead of this one as it better matches the SMILES types returned by the PubChem API. I think I will also add a smiles property like you have here, but as a shortcut to the absolute_smiles.

@mcs07 mcs07 closed this Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants